package com.itisyue.fun.utils;

import java.util.regex.Pattern;

public class UserInfoCheckUtil {
    public static boolean checkPhone(String phone){
        //用户手机号码校验
        if(Pattern.matches("^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\\d{8}$",phone)){
            //手机号码格式正确
            return true;
        }else {
            //手机号码格式错误
            return false;
        }
    }

    public static void main(String[] args) {
        System.out.println(checkPhone("15071098071"));

        System.out.println(IdNumUtil.check("420982196905043216"));
    }
}
